package sxkyxt.kjyxgs.cn.ishop_gather_uploading_android;

import android.os.Parcel;
import android.os.Parcelable;

import java.util.ArrayList;
import java.util.List;

/**
 * @version V1.0 <描述当前版本功能>.
 * @filename: sxkyxt.kjyxgs.cn.ishop_gather_uploading_android
 * @Author HY  on {Administrator}.
 * @Org 山西科远信通科技有限公司.
 * @Description: ${TODO} .
 * @Motto 大梦谁先觉, 贫僧我自知..
 * @Date 2018/11/30
 */
public class MainBean implements Parcelable {


    /**
     * code : 100
     * msg : 操作成功咯.......
     * extend : {"pageinfo":{"pageNum":1,"pageSize":20,"size":3,"startRow":1,"endRow":3,"total":3,"pages":1,"list":[{"gid":48801,"gbarcode":"432563214","gtid":401,"gtname":"豆浆/豆奶","gname":"432","gpic":"/rimg/1543570691958libai.jpg","gdetailpic":"/rbimg/1543570017899libai_code.jpg","gintroduction":"牛奶/冰品","gprice":234,"gunit":"93","gstandard":"rwe","gorderlevel":"","gcreatetime":1543569735000,"gupdatetime":"","gauthentication":"1"},{"gid":48802,"gbarcode":"432563","gtid":1001,"gtname":"零食小吃","gname":"432","gpic":"/rimg/1543569827486rougumian.jpg","gdetailpic":"/rbimg/1543570468249rougumian_code.jpg","gintroduction":"海外进口","gprice":234,"gunit":"93","gstandard":"rwe","gorderlevel":"","gcreatetime":1543569757000,"gupdatetime":"","gauthentication":"1"},{"gid":48803,"gbarcode":"4325634324","gtid":1001,"gtname":"零食小吃","gname":"432","gpic":"/rimg/1543570372064rougumian.jpg","gdetailpic":"/rbimg/1543571017726rougumian_code.jpg","gintroduction":"海外进口","gprice":234,"gunit":"93","gstandard":"rwe","gorderlevel":"","gcreatetime":1543570247000,"gupdatetime":"","gauthentication":"1"}],"prePage":0,"nextPage":0,"isFirstPage":true,"isLastPage":true,"hasPreviousPage":false,"hasNextPage":false,"navigatePages":20,"navigatepageNums":[1],"navigateFirstPage":1,"navigateLastPage":1,"firstPage":1,"lastPage":1}}
     */

    private int code;
    private String msg;
    private ExtendBean extend;

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    public ExtendBean getExtend() {
        return extend;
    }

    public void setExtend(ExtendBean extend) {
        this.extend = extend;
    }

    public static class ExtendBean implements Parcelable {
        /**
         * pageinfo : {"pageNum":1,"pageSize":20,"size":3,"startRow":1,"endRow":3,"total":3,"pages":1,"list":[{"gid":48801,"gbarcode":"432563214","gtid":401,"gtname":"豆浆/豆奶","gname":"432","gpic":"/rimg/1543570691958libai.jpg","gdetailpic":"/rbimg/1543570017899libai_code.jpg","gintroduction":"牛奶/冰品","gprice":234,"gunit":"93","gstandard":"rwe","gorderlevel":"","gcreatetime":1543569735000,"gupdatetime":"","gauthentication":"1"},{"gid":48802,"gbarcode":"432563","gtid":1001,"gtname":"零食小吃","gname":"432","gpic":"/rimg/1543569827486rougumian.jpg","gdetailpic":"/rbimg/1543570468249rougumian_code.jpg","gintroduction":"海外进口","gprice":234,"gunit":"93","gstandard":"rwe","gorderlevel":"","gcreatetime":1543569757000,"gupdatetime":"","gauthentication":"1"},{"gid":48803,"gbarcode":"4325634324","gtid":1001,"gtname":"零食小吃","gname":"432","gpic":"/rimg/1543570372064rougumian.jpg","gdetailpic":"/rbimg/1543571017726rougumian_code.jpg","gintroduction":"海外进口","gprice":234,"gunit":"93","gstandard":"rwe","gorderlevel":"","gcreatetime":1543570247000,"gupdatetime":"","gauthentication":"1"}],"prePage":0,"nextPage":0,"isFirstPage":true,"isLastPage":true,"hasPreviousPage":false,"hasNextPage":false,"navigatePages":20,"navigatepageNums":[1],"navigateFirstPage":1,"navigateLastPage":1,"firstPage":1,"lastPage":1}
         */

        private PageinfoBean pageinfo;

        public PageinfoBean getPageinfo() {
            return pageinfo;
        }

        public void setPageinfo(PageinfoBean pageinfo) {
            this.pageinfo = pageinfo;
        }

        public static class PageinfoBean implements Parcelable {
            /**
             * pageNum : 1
             * pageSize : 20
             * size : 3
             * startRow : 1
             * endRow : 3
             * total : 3
             * pages : 1
             * list : [{"gid":48801,"gbarcode":"432563214","gtid":401,"gtname":"豆浆/豆奶","gname":"432","gpic":"/rimg/1543570691958libai.jpg","gdetailpic":"/rbimg/1543570017899libai_code.jpg","gintroduction":"牛奶/冰品","gprice":234,"gunit":"93","gstandard":"rwe","gorderlevel":"","gcreatetime":1543569735000,"gupdatetime":"","gauthentication":"1"},{"gid":48802,"gbarcode":"432563","gtid":1001,"gtname":"零食小吃","gname":"432","gpic":"/rimg/1543569827486rougumian.jpg","gdetailpic":"/rbimg/1543570468249rougumian_code.jpg","gintroduction":"海外进口","gprice":234,"gunit":"93","gstandard":"rwe","gorderlevel":"","gcreatetime":1543569757000,"gupdatetime":"","gauthentication":"1"},{"gid":48803,"gbarcode":"4325634324","gtid":1001,"gtname":"零食小吃","gname":"432","gpic":"/rimg/1543570372064rougumian.jpg","gdetailpic":"/rbimg/1543571017726rougumian_code.jpg","gintroduction":"海外进口","gprice":234,"gunit":"93","gstandard":"rwe","gorderlevel":"","gcreatetime":1543570247000,"gupdatetime":"","gauthentication":"1"}]
             * prePage : 0
             * nextPage : 0
             * isFirstPage : true
             * isLastPage : true
             * hasPreviousPage : false
             * hasNextPage : false
             * navigatePages : 20
             * navigatepageNums : [1]
             * navigateFirstPage : 1
             * navigateLastPage : 1
             * firstPage : 1
             * lastPage : 1
             */

            private int pageNum;
            private int pageSize;
            private int size;
            private int startRow;
            private int endRow;
            private int total;
            private int pages;
            private int prePage;
            private int nextPage;
            private boolean isFirstPage;
            private boolean isLastPage;
            private boolean hasPreviousPage;
            private boolean hasNextPage;
            private int navigatePages;
            private int navigateFirstPage;
            private int navigateLastPage;
            private int firstPage;
            private int lastPage;
            private List<ListBean> list;
            private List<Integer> navigatepageNums;

            public int getPageNum() {
                return pageNum;
            }

            public void setPageNum(int pageNum) {
                this.pageNum = pageNum;
            }

            public int getPageSize() {
                return pageSize;
            }

            public void setPageSize(int pageSize) {
                this.pageSize = pageSize;
            }

            public int getSize() {
                return size;
            }

            public void setSize(int size) {
                this.size = size;
            }

            public int getStartRow() {
                return startRow;
            }

            public void setStartRow(int startRow) {
                this.startRow = startRow;
            }

            public int getEndRow() {
                return endRow;
            }

            public void setEndRow(int endRow) {
                this.endRow = endRow;
            }

            public int getTotal() {
                return total;
            }

            public void setTotal(int total) {
                this.total = total;
            }

            public int getPages() {
                return pages;
            }

            public void setPages(int pages) {
                this.pages = pages;
            }

            public int getPrePage() {
                return prePage;
            }

            public void setPrePage(int prePage) {
                this.prePage = prePage;
            }

            public int getNextPage() {
                return nextPage;
            }

            public void setNextPage(int nextPage) {
                this.nextPage = nextPage;
            }

            public boolean isIsFirstPage() {
                return isFirstPage;
            }

            public void setIsFirstPage(boolean isFirstPage) {
                this.isFirstPage = isFirstPage;
            }

            public boolean isIsLastPage() {
                return isLastPage;
            }

            public void setIsLastPage(boolean isLastPage) {
                this.isLastPage = isLastPage;
            }

            public boolean isHasPreviousPage() {
                return hasPreviousPage;
            }

            public void setHasPreviousPage(boolean hasPreviousPage) {
                this.hasPreviousPage = hasPreviousPage;
            }

            public boolean isHasNextPage() {
                return hasNextPage;
            }

            public void setHasNextPage(boolean hasNextPage) {
                this.hasNextPage = hasNextPage;
            }

            public int getNavigatePages() {
                return navigatePages;
            }

            public void setNavigatePages(int navigatePages) {
                this.navigatePages = navigatePages;
            }

            public int getNavigateFirstPage() {
                return navigateFirstPage;
            }

            public void setNavigateFirstPage(int navigateFirstPage) {
                this.navigateFirstPage = navigateFirstPage;
            }

            public int getNavigateLastPage() {
                return navigateLastPage;
            }

            public void setNavigateLastPage(int navigateLastPage) {
                this.navigateLastPage = navigateLastPage;
            }

            public int getFirstPage() {
                return firstPage;
            }

            public void setFirstPage(int firstPage) {
                this.firstPage = firstPage;
            }

            public int getLastPage() {
                return lastPage;
            }

            public void setLastPage(int lastPage) {
                this.lastPage = lastPage;
            }

            public List<ListBean> getList() {
                return list;
            }

            public void setList(List<ListBean> list) {
                this.list = list;
            }

            public List<Integer> getNavigatepageNums() {
                return navigatepageNums;
            }

            public void setNavigatepageNums(List<Integer> navigatepageNums) {
                this.navigatepageNums = navigatepageNums;
            }

            public static class ListBean implements Parcelable {
                /**
                 * gid : 48801
                 * gbarcode : 432563214
                 * gtid : 401
                 * gtname : 豆浆/豆奶
                 * gname : 432
                 * gpic : /rimg/1543570691958libai.jpg
                 * gdetailpic : /rbimg/1543570017899libai_code.jpg
                 * gintroduction : 牛奶/冰品
                 * gprice : 234
                 * gunit : 93
                 * gstandard : rwe
                 * gorderlevel :
                 * gcreatetime : 1543569735000
                 * gupdatetime :
                 * gauthentication : 1
                 */

                private int gid;
                private String gbarcode;
                private int gtid;
                private String gtname;
                private String gname;
                private String gpic;
                private String gdetailpic;
                private String gintroduction;
                private double gprice;
                private String gunit;
                private String gstandard;
                private String gorderlevel;
                private long gcreatetime;
                private String gupdatetime;
                private String gauthentication;

                public int getGid() {
                    return gid;
                }

                public void setGid(int gid) {
                    this.gid = gid;
                }

                public String getGbarcode() {
                    return gbarcode;
                }

                public void setGbarcode(String gbarcode) {
                    this.gbarcode = gbarcode;
                }

                public int getGtid() {
                    return gtid;
                }

                public void setGtid(int gtid) {
                    this.gtid = gtid;
                }

                public String getGtname() {
                    return gtname;
                }

                public void setGtname(String gtname) {
                    this.gtname = gtname;
                }

                public String getGname() {
                    return gname;
                }

                public void setGname(String gname) {
                    this.gname = gname;
                }

                public String getGpic() {
                    return gpic;
                }

                public void setGpic(String gpic) {
                    this.gpic = gpic;
                }

                public String getGdetailpic() {
                    return gdetailpic;
                }

                public void setGdetailpic(String gdetailpic) {
                    this.gdetailpic = gdetailpic;
                }

                public String getGintroduction() {
                    return gintroduction;
                }

                public void setGintroduction(String gintroduction) {
                    this.gintroduction = gintroduction;
                }

                public double getGprice() {
                    return gprice;
                }

                public void setGprice(double gprice) {
                    this.gprice = gprice;
                }

                public String getGunit() {
                    return gunit;
                }

                public void setGunit(String gunit) {
                    this.gunit = gunit;
                }

                public String getGstandard() {
                    return gstandard;
                }

                public void setGstandard(String gstandard) {
                    this.gstandard = gstandard;
                }

                public String getGorderlevel() {
                    return gorderlevel;
                }

                public void setGorderlevel(String gorderlevel) {
                    this.gorderlevel = gorderlevel;
                }

                public long getGcreatetime() {
                    return gcreatetime;
                }

                public void setGcreatetime(long gcreatetime) {
                    this.gcreatetime = gcreatetime;
                }

                public String getGupdatetime() {
                    return gupdatetime;
                }

                public void setGupdatetime(String gupdatetime) {
                    this.gupdatetime = gupdatetime;
                }

                public String getGauthentication() {
                    return gauthentication;
                }

                public void setGauthentication(String gauthentication) {
                    this.gauthentication = gauthentication;
                }

                @Override
                public int describeContents() {
                    return 0;
                }

                @Override
                public void writeToParcel(Parcel dest, int flags) {
                    dest.writeInt(this.gid);
                    dest.writeString(this.gbarcode);
                    dest.writeInt(this.gtid);
                    dest.writeString(this.gtname);
                    dest.writeString(this.gname);
                    dest.writeString(this.gpic);
                    dest.writeString(this.gdetailpic);
                    dest.writeString(this.gintroduction);
                    dest.writeDouble(this.gprice);
                    dest.writeString(this.gunit);
                    dest.writeString(this.gstandard);
                    dest.writeString(this.gorderlevel);
                    dest.writeLong(this.gcreatetime);
                    dest.writeString(this.gupdatetime);
                    dest.writeString(this.gauthentication);
                }

                public ListBean() {
                }

                protected ListBean(Parcel in) {
                    this.gid = in.readInt();
                    this.gbarcode = in.readString();
                    this.gtid = in.readInt();
                    this.gtname = in.readString();
                    this.gname = in.readString();
                    this.gpic = in.readString();
                    this.gdetailpic = in.readString();
                    this.gintroduction = in.readString();
                    this.gprice = in.readDouble();
                    this.gunit = in.readString();
                    this.gstandard = in.readString();
                    this.gorderlevel = in.readString();
                    this.gcreatetime = in.readLong();
                    this.gupdatetime = in.readString();
                    this.gauthentication = in.readString();
                }

                public static final Creator<ListBean> CREATOR = new Creator<ListBean>() {
                    @Override
                    public ListBean createFromParcel(Parcel source) {
                        return new ListBean(source);
                    }

                    @Override
                    public ListBean[] newArray(int size) {
                        return new ListBean[size];
                    }
                };
            }


            @Override
            public int describeContents() {
                return 0;
            }

            @Override
            public void writeToParcel(Parcel dest, int flags) {
                dest.writeInt(this.pageNum);
                dest.writeInt(this.pageSize);
                dest.writeInt(this.size);
                dest.writeInt(this.startRow);
                dest.writeInt(this.endRow);
                dest.writeInt(this.total);
                dest.writeInt(this.pages);
                dest.writeInt(this.prePage);
                dest.writeInt(this.nextPage);
                dest.writeByte(this.isFirstPage ? (byte) 1 : (byte) 0);
                dest.writeByte(this.isLastPage ? (byte) 1 : (byte) 0);
                dest.writeByte(this.hasPreviousPage ? (byte) 1 : (byte) 0);
                dest.writeByte(this.hasNextPage ? (byte) 1 : (byte) 0);
                dest.writeInt(this.navigatePages);
                dest.writeInt(this.navigateFirstPage);
                dest.writeInt(this.navigateLastPage);
                dest.writeInt(this.firstPage);
                dest.writeInt(this.lastPage);
                dest.writeList(this.list);
                dest.writeList(this.navigatepageNums);
            }

            public PageinfoBean() {
            }

            protected PageinfoBean(Parcel in) {
                this.pageNum = in.readInt();
                this.pageSize = in.readInt();
                this.size = in.readInt();
                this.startRow = in.readInt();
                this.endRow = in.readInt();
                this.total = in.readInt();
                this.pages = in.readInt();
                this.prePage = in.readInt();
                this.nextPage = in.readInt();
                this.isFirstPage = in.readByte() != 0;
                this.isLastPage = in.readByte() != 0;
                this.hasPreviousPage = in.readByte() != 0;
                this.hasNextPage = in.readByte() != 0;
                this.navigatePages = in.readInt();
                this.navigateFirstPage = in.readInt();
                this.navigateLastPage = in.readInt();
                this.firstPage = in.readInt();
                this.lastPage = in.readInt();
                this.list = new ArrayList<ListBean>();
                in.readList(this.list, ListBean.class.getClassLoader());
                this.navigatepageNums = new ArrayList<Integer>();
                in.readList(this.navigatepageNums, Integer.class.getClassLoader());
            }

            public static final Creator<PageinfoBean> CREATOR = new Creator<PageinfoBean>() {
                @Override
                public PageinfoBean createFromParcel(Parcel source) {
                    return new PageinfoBean(source);
                }

                @Override
                public PageinfoBean[] newArray(int size) {
                    return new PageinfoBean[size];
                }
            };
        }


        @Override
        public int describeContents() {
            return 0;
        }

        @Override
        public void writeToParcel(Parcel dest, int flags) {
            dest.writeParcelable(this.pageinfo, flags);
        }

        public ExtendBean() {
        }

        protected ExtendBean(Parcel in) {
            this.pageinfo = in.readParcelable(PageinfoBean.class.getClassLoader());
        }

        public static final Creator<ExtendBean> CREATOR = new Creator<ExtendBean>() {
            @Override
            public ExtendBean createFromParcel(Parcel source) {
                return new ExtendBean(source);
            }

            @Override
            public ExtendBean[] newArray(int size) {
                return new ExtendBean[size];
            }
        };
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeInt(this.code);
        dest.writeString(this.msg);
        dest.writeParcelable(this.extend, flags);
    }

    public MainBean() {
    }

    protected MainBean(Parcel in) {
        this.code = in.readInt();
        this.msg = in.readString();
        this.extend = in.readParcelable(ExtendBean.class.getClassLoader());
    }

    public static final Parcelable.Creator<MainBean> CREATOR = new Parcelable.Creator<MainBean>() {
        @Override
        public MainBean createFromParcel(Parcel source) {
            return new MainBean(source);
        }

        @Override
        public MainBean[] newArray(int size) {
            return new MainBean[size];
        }
    };
}
